# Replication Package (Harvard Dataverse)

This package reproduces the main empirical results, tables, and figures reported in the accompanying manuscript.

## Important license note (ESS microdata)

The empirical analyses rely on European Social Survey (ESS) microdata, which are **third-party data** and typically **cannot be redistributed** inside a public replication package.  
This package therefore contains **code only** for ESS microdata steps. You must download the ESS integrated files from the official ESS data archive and place them locally as described below.

## Quick start (Windows / PowerShell)

1) Create a clean environment (recommended):

`python -m venv .venv`

`.\.venv\Scripts\activate`

2) Install dependencies:

`pip install -r requirements.txt`

3) Provide required inputs:

- ESS integrated zip files: place under `ess_data/integrated_files/` (see below).

4) Run the replication pipeline:

`python run_replication.py`

## Expected local inputs

### ESS microdata (not included)

Place these (or newer compatible) zip files under:

`ess_data/integrated_files/`

Required rounds for this project:
- `ESS8_integrated_*.zip`
- `ESS9_integrated_*.zip`
- `ESS10_integrated_*.zip`
- `ESS11_integrated_*.zip`

Also required:
- `ess_data/integrated_files_coverage.csv`

## Outputs

The pipeline writes derived datasets and intermediate results to `outputs/` and exports manuscript-ready tables/figures to `paper_joc/`.
Key items correspond to:
- Main tables: `paper_joc/tables/iv_shiftshare_ols_vs_iv.tex` (OLS vs IV) and `paper_joc/tables/iv_shiftshare_mechanisms.tex` (mechanisms).
- Main figures: generated by `analysis/23_make_joc_figures.py` into `paper_joc/figures/`.

## Reproducibility checksum

`MANIFEST.SHA256` contains SHA-256 checksums for the files shipped in this package.

